Skip to content

[6.x] Allow choosing which columns to export form submissions - #15347

Merged
jasonvarga merged 2 commits into
6.xfrom
export-columns
Sep 16, 2026
Merged

jasonvarga merged 2 commits into
6.xfrom
export-columns

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Sep 2, 2026

Copy link
Copy Markdown
Member

This pull request implements the ability to choose which columns are included when exporting form submissions.

Previously, the export modal let you pick a format and whether to export all or filtered submissions, but every export included every field. Now there's a "Columns" section in the modal, with all fields (plus the date) selected by default and a "Select All" / "Deselect All" toggle.

Column selection lives in the modal, rather than on individual exporters, since it's a property of the request in the same way filtering is. The selected columns are passed to the exporter, which decides how to honour them.

Exporters

The base Exporter class gains a columns() helper which returns the selected column handles in form order, defaulting to every field plus date when nothing has been selected. The built-in CSV and JSON exporters use it, and custom exporters can too.

Column selection is opt-in. Custom exporters that honour columns() should override supportsColumnSelection() to return true, otherwise the "Columns" section is hidden when that exporter is chosen. This means existing custom exporters keep working exactly as before.

This PR also extracts the export modal into its own ExportSubmissionsModal component.

Before

CleanShot 2026-09-02 at 13 03 42

After

CleanShot 2026-09-02 at 12 59 56

Exporters can now opt into column selection via supportsColumnSelection(),
and receive a subset via setColumns(). The submissions export modal gains a
column checkbox list for exporters that support it, and was extracted out of
the listing page into its own component.

The filtered-scope description no longer mentions sort order, which applies
to both scopes since #15105.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jasonvarga
jasonvarga changed the base branch from forms-2 to 6.x September 16, 2026 19:03
@jasonvarga jasonvarga changed the title [6.x] Forms 2: Allow choosing which columns to export [6.x] Allow choosing which columns to export form submissions Sep 16, 2026
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jasonvarga
jasonvarga merged commit 8fe067b into 6.x Sep 16, 2026
64 checks passed
@jasonvarga
jasonvarga deleted the export-columns branch September 16, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants